package cn.lizemin.controller;

import cn.lizemin.common.User;
import cn.lizemin.web.annotation.RequestMapping;

/**
 * @author lzm
 * @Date 2024/7/20
 * @description
 */
public class HelloController {

    /**
     * 返回的是视图的名称
     */
    @RequestMapping("/heart")
    public String heart() {
        System.out.println("this is heart");
        return "ok";
    }

    @RequestMapping("/getUserById")
    public User getUserById(Integer id) {
        System.out.println("接受到请求入参：id = " + id);
        User user = new User();
        user.setId(id);
        user.setName("lzm");
        user.setAge(18);
        return user;
    }

}
